package com.commander.spring.cloud.service;

import com.commander.spring.cloud.dao.order.OrderDao;
import com.commander.spring.cloud.dao.order.OrderEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;

/**
 * description:
 * <p>
 * Date: 2020-06-05
 * <p>
 * Time: 15:58
 *
 * @author zhangxin
 */
@Service
public class OrderServiceImpl implements OrderService{
	
	@Autowired
	private OrderDao orderDao;
	
	@Override
	public boolean createOrder(OrderEntity order) {
		Assert.notNull(order, "order");
		
		orderDao.insert(order);
		return false;
	}
	
	@Override
	public OrderEntity getById(String id) {
		return orderDao.selectById(id);
	}
}
